/**
 * Created by Administrator on 2017/2/13.
 */
import { Component,OnInit } from '@angular/core';
import { CheckfailService } from './checkfail.serve';
import { Router, ActivatedRoute, Params } from '@angular/router';

@Component({
  moduleId: module.id,
  selector: 'my-checkfail',
  templateUrl: 'checkfail.html',
  providers:[ CheckfailService ]
})
export class CheckfailComponent implements OnInit {
  private productinfro='';
  constructor(
      private CheckfailService:CheckfailService,
      private route: ActivatedRoute,
      private router: Router,
  ){}

  //得到审核未通过材料的信息
  getfac(){
    this.CheckfailService.grtinfro()
        .subscribe(
            res =>{this.productinfro =res;
              console.log(this.productinfro)},
            error =>  { console.log(error)}
        );
  }

  ngOnInit() {
    this.getfac()
  }

  //跳转材料详情页
  gomatrialdetial(id:string){
    this.router.navigate(['/facdit',id]);
  }
}
